import { Model, Post, Get } from "@xuekl/cli-core/annotate";
import { LoginOut, GetCaptchaOut } from "./interface";
import R from "@xuekl/cli-core/r";

@Model('')
export default class LoginService {

    @Post('/login')
    login(res) {
        return new R<LoginOut>(res.code, res).result()
    }

    @Get('/captchaImage')
    getCaptcha(res) {
        return new R<GetCaptchaOut>(res.code, res).result((data) => {
            data.img = '好山好水'
        })
    }
}